﻿using Endos.Wodo.Domain;
using System;

namespace Endos.Wodo.Persistence
{
    public interface IDataContext
    {
        IQuery<T> CreateQuery<T>(Action<IFetch<T>> action = null) where T : Entity;
        void Insert<T>(T entity) where T : Entity;
        void Update<T>(T entity) where T : Entity;
        void Delete<T>(T entity) where T : Entity;
        void Merge<T>(T entity) where T : Entity;
        void Detach<T>(T entity) where T : Entity;
        void Flush();
    }
}
